package extendsdemo;

class Animal{
	String name;
	int age;
	public void shout () {
		System.out.println(name + "在叫");
	}
}

// 猫继承了Animal, !!!继承来的东西就是自己本类的
class Cat extends Animal{
    String skill;
}

public class Demo1 {
	public static void main(String[] args) {
		Cat c = new Cat();
		c.name = "花花";
		c.age = 2;
		c.shout();
		c.skill = "爬树";
	}
}
